Sharing Continuations: Proofnets for Languages with Explicit Control

نویسندگان

  • Julia L. Lawall
  • Harry G. Mairson
چکیده

We introduce graph reduction technology that implements functional languages with control, such as Scheme with call/cc, where continuations can be manipulated explicitly as values, and can be optimally reduced in the sense of Lévy. The technology is founded on proofnets for multiplicative-exponential linear logic, extending the techniques originally proposed by Lamping, where we adapt the continuationpassing style transformation to yield a new understanding of sharable values. Confluence is maintained by returning multiple answers to a (shared) continuation. Proofnets provide a concurrent version of linear logic proofs, eliminating structurally irrelevant sequentialization, and ignoring asymmetric distinctions between inputs and outputs—dually, expressions and continuations. While Lamping’s graphs and their variants encode an embedding of intuitionistic logic into linear logic, our construction implicitly contains an embedding of classical logic into linear logic. We propose a family of translations, produced uniformly by beginning with a continuation-passing style semantics for the languages, employing standard codings into proofnets using call-by-value, call-by-name—or hybrids of the two—to locate proofnet boxes, and converting the proofnets to direct style. The resulting graphs can be reduced simply (cut elimination for linear logic), have a consistent semantics that is preserved by reduction (geometry of interaction, via the so-called context semantics), and allow shared, incremental evaluation of continuations (optimal reduction).

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Call-by-value isn’t dual to call-by-name, call-by-name is dual to call-by-value!

Gentzen’s sequent calculus for classical logic shows great symmetry: for example, the rule introducing ∧ on the left of a sequent is mirror symmetric to the introduction rule for the dual operator ∨ on the right of a sequent. A consequence of this casual observation is that when Γ ` ∆ is a theorem over operators {∨,∧,¬}, then so is ∆ ` Γ, where Σ reverses the order of formulas in Σ, and exchang...

متن کامل

Dealing with Explicit Exceptions in Prolog

Existing logic languages provide some simple "extra-logical" constructs for control manipulation , such as the cut of standard Prolog and the exception handling constructs of other versions of Prolog (e.g. SICStus Prolog). Aspects speciically concerning the ow of control in a language can be quite naturally modelled by means of the Denotational Semantics, and in particular the Denotational Sema...

متن کامل

Continuations in Prolog

Continuations are well known in functional programming where they have been used to transform and compile programs. Some languages provide explicit manipulations of the continuation for the user: The user can catch and modify the current continuation. Continuations have also been used in the logic programming context to give a denotational semantics for Prolog, to generate Prolog compilers and ...

متن کامل

The Theory and Practice of Programming Languages with Delimited Continuations

This dissertation presents a study of functional programming languages with first-class delimited continuations. We focus mainly on theoretical and practical aspects of Danvy and Filinski’s hierarchy of static delimited-control operators shiftn and resetn, and of Felleisen’s dynamic delimited-control operators control and prompt. Our study uses the traditional means of specifying semantics of f...

متن کامل

Types for Delimited Control Operators

There are a great variety of control constructs in programming languages: conditionals, goto, coroutines, threads, processes, break, return, and, of course, continuations. The advantage of continuations over the others is that many of the other control constructs are expressible in terms of them. Unfortunately, the global continuations operators (e.g., call/cc) that are implemented in languages...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2000